export interface ResponseData {
  code: number
  msg: string
  ok: boolean
}

// 定义SKU对象的ts类型

export interface SkuData {
  category3Id?: number | string
  spuId?: number | string
  tmId?: number | string
  skuName?: string
  price?: number | string
  weight?: number | string
  skuDesc?: string
  skuAttrValueList?: SkuAttrValue[]
  skuSaleAttrValueList?: SaleArr[]
  skuDefaultImg?: string
  isSale?: number
  id?: number
  skuImageList?: any[]
}

export interface SaleArr {
  id?: number
  saleAttrValueName?: string
  saleAttrId: number | string
  saleAttrValueId: number | string
}

export interface SkuAttrValue {
  id?: number
  valueName?: string
  attrId: number | string
  valueId: number | string
}

// 获取SKU接口返回的数据ts类型
export interface SkuResponseData extends ResponseData {
  data: {
    records: SkuData[]
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
    pages: number
  }
}

// 获取SKU商品详情接口的ts类型
export interface SkuInfo extends ResponseData {
  data: SkuData
}
